<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title></title>
    <script src="/res_common/third/jquery/jquery-2.1.4.min.js"></script>
    <script>
        $(document).ready(function () {
            $.get("/res_common/oui/ui/ui_pc/controls/cut-img/cut-img.tpl.html", function (result) {
                var parameters = result.split(/\n/);
                var contentStr = "";
                for (var i = 0, len = parameters.length; i < len; i++) {
                    //去掉换行符
                    contentStr += '\n';
                    while (parameters[i].indexOf(' ') == 0) {
                        parameters[i] = parameters[i].substring(1, parameters[i].length);
                        contentStr += " ";
                    }
                    while (parameters[i].indexOf('\t') == 0) {
                        parameters[i] = parameters[i].substring(1, parameters[i].length);
                        contentStr += "\t";
                    }
                    contentStr += '\'' + parameters[i].replace(/[\r\n]/g, "").replace(/\'/g,'\\\'').replace(/\"/g,'\\\"') + '\'+';
                }
                contentStr = contentStr.substring(0, contentStr.length - 1) + ";";
                console.log(contentStr);
                $("#test").val(contentStr);
            }, "text");

        });
    </script>
</head>
<body>
<textarea id="test" name="t" style="width: 100%;height: 300px;"></textarea>
</body>
</html>





